<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
  <style>
    * {
      margin: 0;
      padding: 0;
    }

    ul {
      list-style: none;
      display: flex;
    }

    li {
      flex: 1;
    }
    li:hover{
      font-size: 20px;
    
    }
    .active {
      background-color: aquamarine;
    }
  </style>
</head>

<body>
  <div id="app">
    <ul>
      <li v-for="(data,index) in list" :class="active == index?'active':''" @click="touch(index)">
        {{data}}
      </li>
    </ul>
  </div>
  <script>
    var app = new Vue({
      el: '#app',
      data: {
        list: ['首页', '列表', '我的', '商城', '联系', '我们', '举报'],
        active :0
      },
      methods:{
      touch(i) {
       this.active = i
      }
    },
    })
  </script>
</body>

</html>